<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <input type="hidden" id="examSubmitStatus" th:value="${exam.yuliu2}">
    <input type="hidden" id="examId" th:value="${studentExam.exam_id}">
    <input type="hidden" id="examStudentId" th:value="${studentExam.student_id}">
    <input type="hidden" id="examClassName" th:value="${examStudentDTO.exam_group}">
    <div id="student_examPaper_title">
        <div class="alert alert-info" role="alert" th:text="${examStudentDTO.exam_group+'---------'+examStudentDTO.sname}"></div>
        <div style="float: right;margin-top: -50px;padding-right: 20px"><a href="javascript:void(0)" onclick="exam.paperReturn()">返回</a></div>
    </div>
    <div id="student_examPaper_right">
        <div id="student_examPaper_right_score">
            <b th:text="${'总分：'+examStudentDTO.score+'分'}"></b>
            <hr>
        </div>
    </div>
    <div id="student_examPaper_content">
        <div class="questionBox">
            <div th:each="question:${questions}" class="question">
                <div class="question-title">
                    <b th:text="${questionStat.index+1+'.'+question.type+'('+question.score+'分)'}"></b>
                    <div style="width:100px;float: right">
                        <th:block th:if="${exam.yuliu2=='提交'}">
                            <input disabled="disabled" th:value="${selfAnswerScores.get(questionStat.index)}" style="width: 50px" class="form-control" >
                        </th:block>
                        <th:block th:if="${exam.yuliu2 == null || exam.yuliu2!='提交'}">
                            <input onmouseleave="exam.examStudentScoreChange()" th:value="${selfAnswerScores.get(questionStat.index)}" style="width: 50px" class="form-control" >
                        </th:block>
                        <th:block th:if="${question.type== '填空题' || question.type== '综合题'}">
                            <a style="float: right;margin-top: -30px;padding-right: 10px" onclick="exam.review(this)" href="javascript:void(0)">批阅</a>
                        </th:block>
                    </div>
                </div>
                <div class="question-subject" th:text="${question.subject}"></div>
                <div class="options">
                    <th:block th:if="${question.type=='单选题'}">
                        <div th:each="number:${question.optionNumber}" class="row">
                            <div th:classappend="${question.answers[numberStat.index]!=null && question.answers[numberStat.index] == number?'active':''}" class="question1_option_number col-md-2" th:text="${number}"></div><div th:text="${question.options[numberStat.index]}" class="question1_option col-md-10"></div>
                        </div>
                        <th:block th:if="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer">该学生没有填写该题答案</div>
                            </div>
                        </th:block>
                        <th:block th:unless="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer" th:text="${studentExamAnswerVO.answers.get(questionStat.index)}"></div>
                            </div>
                        </th:block>

                    </th:block>
                    <th:block th:if="${question.type=='多选题'}">
                        <div th:each="number:${question.optionNumber}" class="row">
                            <div th:classappend="${question.answers[numberStat.index]!=null && question.answers[numberStat.index] == number?'active':''}" class="question2_option_number col-md-2" th:text="${number}"></div><div th:text="${question.options[numberStat.index]}" class="question1_option col-md-10"></div>
                        </div>
                        <th:block th:if="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer">该学生没有填写该题答案</div>
                            </div>
                        </th:block>
                        <th:block th:unless="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div>
                                <div class="col-md-1" th:each="answer:${studentExamAnswerVO.answers.get(questionStat.index)}" th:if="${answer!=' '}">
                                        [[${answer}]]
                                </div>
                            </div>
                        </th:block>
                    </th:block>
                    <th:block th:if="${question.type=='判断题'}">
                        <div class="row">
                            <div th:classappend="${question.answers[0] == '正确'?'active':''}" class="col-md-2 question3_option_number">正确</div><div th:classappend="${question.answers[0] == '错误'?'active':''}" class="col-md-2 question3_option_number">错误</div>
                        </div>
                        <th:block th:if="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer">该学生没有填写该题答案</div>
                            </div>
                        </th:block>
                        <th:block th:unless="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer" th:text="${studentExamAnswerVO.answers.get(questionStat.index)}"></div>
                            </div>
                        </th:block>
                    </th:block>
                    <th:block th:if="${question.type=='填空题'}">
                        <div th:each="answer:${question.answers}" class="row">
                            <div class="question4_option_number col-md-2 active" th:text="${'填空题'+(answerStat.index+1)}"></div><div th:text="${answer}" class="col-md-6"></div>
                        </div>
                        <th:block th:if="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer">该学生没有填写该题答案</div>
                            </div>
                        </th:block>
                        <th:block th:unless="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div>
                                <div class="col-md-1" th:each="answer:${studentExamAnswerVO.answers.get(questionStat.index)}">
                                    [[${answer}]]
                                </div>
                            </div>
                        </th:block>
                        <div style="display: none" class="review4" th:text="${reviewList.get(questionStat.index)==''?'无':reviewList.get(questionStat.index)}"></div>
                    </th:block>
                    <th:block th:if="${question.type=='综合题'}">
                        <div class="row">
                            <div class="question5_option_number col-md-2 active">答案解析</div><div th:text="${question.answers[0]}" class="col-md-6"></div>
                        </div>
                        <th:block th:if="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer">该学生没有填写该题答案</div>
                            </div>
                        </th:block>
                        <th:block th:unless="${studentExamAnswerVO.answers.size()==0}">
                            <div class="row question_selfAnswer_box">
                                <div class="studentAnswer col-md-2">学生答案</div><div class="col-md-3 question_selfAnswer" th:text="${studentExamAnswerVO.answers.get(questionStat.index)}"></div>
                            </div>
                        </th:block>
                        <div style="display: none" class="review5" th:text="${reviewList.get(questionStat.index)==''?'无':reviewList.get(questionStat.index)}"></div>
                    </th:block>

                </div>
                <div><hr></div>
            </div>
        </div>

    </div>

</html>